package com.xxw.yygh.hosp.controller.admin;

import com.xxw.yygh.common.result.R;
import com.xxw.yygh.model.acl.User;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/user")
public class UserController {

    @PostMapping("/login")
    public R login(@RequestBody User user){
        //暂时不去数据库查，用户系统再去
        return R.ok().data("token","admin-token");
    }

    @GetMapping("/info")
    public R info(String token){
        return R.ok().data("roles","[admin]")
                    .data("introduction","I am a super administrator")
                    .data("avatar","https://p8.itc.cn/images01/20201108/6db2849e128c4d3fbaafcba1f9247630.gif")
                    .data("name","Super Admin");
    }
}
